<template>
  <div class="rate">
    <!-- 评分列表 -->
    <div class="rate-table">
      <el-table
        :data="rateList"
        height="600"
        border
        style="width: 100%; max-width: 1400px"
      >
        <el-table-column
          prop="openid"
          label="openid"
          width="260"
          align="center"
        >
        </el-table-column>
        <!-- <el-table-column
          prop="publisher"
          label="发布人"
          width="200"
          align="center"
        >
        </el-table-column> -->
        <el-table-column prop="value" label="评分" width="280" align="center">
          <template slot-scope="scope">
            <el-rate v-model="scope.row.value" :colors="colors" disabled>
            </el-rate>
          </template>
        </el-table-column>
        <el-table-column prop="text" label="建议" width="500" align="center">
        </el-table-column>
      </el-table>
    </div>
  </div>
</template>

<script>
import rateApi from "@/api/rate";
export default {
  name: "Rate",
  data() {
    return {
      colors: ["#99A9BF", "#F7BA2A", "#FF9900"],
      rateList: [],
    };
  },
  created() {
    this.getList();
  },
  methods: {
    async getList() {
      const res = await rateApi.getRate();
      console.log(res);
      this.rateList = res.data;
    },
  },
};
</script>

<style scoped lang="less">
.rate {
  padding: 30px;
}
</style>